-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: DataFrame.explode is failing on scalar int value. #43324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The **int** datatype of the column was raising this issue.
@@ -8271,7 +8271,7 @@ def explode( | |||
|
|||
columns: list[str | tuple] | |||
if is_scalar(column) or isinstance(column, tuple): | |||
assert isinstance(column, (str, tuple)) | |||
assert isinstance(column, (str, tuple, int)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests first
We should check for scalar values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually i would remove the assert entirely i think (but agreed on tests), e.g. you can in theory have a datetime here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes hence the scalar idea, but yeah removing is ok too
@shubh242 can you aslo add a whatsnew note in 1.3.3, put in the bug fix reshaping section is ok |
@shubh242 in the 1.3.x release notes we don't have the subsections. so just add to the regressions section. |
@shubh242 are you interested in continuing? |
Yes i would like to give it another try. Can you be specific about what is failing by doing the change. |
Please adress the review comments above |
@shubh242 this PR is not yet ready (needs release note and tests) and planning a release tomorrow, moving to 1.3.4 milestone. |
@shubh242 if you can update to comments and merge master |
superseded by #43802 |
closes #43314
The int datatype of the column was raising this issue.